<template>
  <div>
    <label>账号：</label>
    <input type="text" v-model="username" placeholder="请输入账号" @keyup="changepassword" />
  </div>
</template>

<script>
export default {
  name: 'input1',
  data () {
    return {
      username: this.$store.state.demo
    }
  },
  methods: {
    changepassword () {
      this.$store.state.demo = this.username
    }
  }
}
</script>
